package com.cskaoyan.service;

import com.cskaoyan.bean.User;
import com.cskaoyan.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserLoginServiceImpl implements UserLoginService{
    @Autowired
    UserMapper userMapper;

    @Override
    public User getLoginInfo(String name) {
        List<User> users = userMapper.selectUserByName(name);
        return users.size() >= 1 ? users.get(0) : null;
    }
}
